<? 
//<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
session_start();
require ("inc.php");
admin_core::check();
$rows = 20;
$page = (int)((int)$_REQUEST['page']?(int)$_REQUEST['page']:1);
/* 以下是程序部份 */
$db_admin 		= &new db($scfg['db']['admin']);
$popedom 	= admin_core::getPopedomGroup();
//print_r($popedom);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="Script/lib.js" type="text/javascript"></script>
<script src="Script/lib.ext.js" type="text/javascript"></script>
<link  href="static/admincp.css" rel="stylesheet" type="text/css" id="css">
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="topmenubg">
  <tr>
    <td rowspan="2" width="160px"><div class="logo"> <a href="<?=$scfg['config']['PoweredCorpUrl']?>" target="_blank"><img src="static/img/logo.gif" alt="Discuz!" class="logoimg" border="0"/></a> <span class="editiontext">
        <?=$scfg['config']['PoweredCorpName']?>
        <span class="editionnumber">
        <?=$scfg['config']['PoweredCorpID']?>
        !</span><br />
        <?=$scfg['config']['SystemName']?>
        </span> </div></td>
    <td><div class="topmenu">
        <ul>
          <? foreach($popedom as $k=>$v){?>
          <li class="_li_<?=$k?>"><span><a href="#" onclick="togglemenu('<?=$k?>');return false;">
            <?=$v['name']?>
            </a></span></li>
          <? }?>
        </ul>
      </div></td>
  </tr>
</table>
</body>
</html>
<script type="text/javascript">
function togglemenu(id) 
{
	var a,menus = <?=json::encode($popedom)?>;
	if(parent.menu) 
	{
		for(k in menus)
		{
			var a = parent.menu.document.getElementById(k)
			if(a) 
			{
				a.style.display = k == id ? '' : 'none';
			}
		}
	}
	parent.main.location=menus[id]['default'];
	$('ul>li').removeAttr('id').parent().find("._li_"+id).attr("id",'menuon');
}
function defaultmenu() 
{
	togglemenu("<?=$admin['purview_default']?>");
}
defaultmenu();
</script>
